package org.ourgrid.broker.scheduler.workqueue.xmlcreator;

public class FinishRequestXMLCreator implements XMLCreatorIF{

	/**
	 * <FINISH_REQUEST requestID='long' peerID='String' jobID='int' requiredWorkers='int'
	 *          maxFails='int' maxReplicas='int'/>
	 */
	public String getXML(long requestID, String peerID, long jobID, int requiredWorkers,
			int maxFails, int maxReplicas){
		
		StringBuffer buffer = new StringBuffer();
		
		buffer.append("<FINISH_REQUEST ");
		buffer.append("requestID='" + requestID + "' ");
		buffer.append("peerID='" + peerID + "' ");
		buffer.append("jobID='" + jobID + "' ");
		buffer.append("requiredWorkers='" + requiredWorkers + "' ");
		buffer.append("maxFails='" + maxFails + "' ");
		buffer.append("maxReplicas='" + maxReplicas + "' ");
		buffer.append("/>");
		
		return buffer.toString();
	}
}
